package com.comment.config.dao.type;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Between{
    @TableField(exist = false)
    private Integer start;
    @TableField(exist = false)
    private Integer end;

    public boolean isIn(Long value){
        return value >= start && value <= end;
    }
    public boolean isIn(Integer value){
        return value >= start && value <= end;
    }
}
